namespace CSharpPro;

public class LeapYearChecker
{
    public void CheckLeapYear()
    {
        Console.Write("请输入一个年份: ");
        int year = Convert.ToInt32(Console.ReadLine());

        if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
        {
            Console.WriteLine($"{year} 是闰年");
        }
        else
        {
            Console.WriteLine($"{year} 不是闰年");
        }
    }
}